emmc and sdcard have different register address, use non-removeable property
to distinguish them.
Signed-off-by: Lin Huang <[email protected]>
Acked-by: Simon Glass <[email protected]>
host->get_mmc_clk = rockchip_dwmmc_get_mmc_clk;
host->priv = dev;
- host->dev_index = (ulong)host->ioaddr == 0xff0f0000 ? 0 : 1;
+ /* use non-removeable as sdcard and emmc as judgement */
+ if (fdtdec_get_bool(gd->fdt_blob, dev->of_offset, "non-removable"))
+ host->dev_index = 1;
return 0;
}